package wyj;

import java.util.Scanner;
import java.util.StringTokenizer;

public class 单词长度 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String s1,s2;
        s1=in.nextLine();
        StringTokenizer word = new StringTokenizer(s1," ,");
        int count=0;
        while (word.hasMoreTokens()){
            if (count>0){
                System.out.print(" ");
            }
            count++;
            s2 = word.nextToken();
            System.out.print(s2.length());
        }
    }
}
